/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.soccer.cms.modules.cms.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import com.soccer.cms.common.persistence.Page;
import com.soccer.cms.common.service.CrudService;
import com.soccer.cms.modules.cms.entity.Racevideo;
import com.soccer.cms.modules.cms.dao.RacevideoDao;

/**
 * 赛事视频Service
 * @author zouqh
 * @version 2015-05-21
 */
@Service
@Transactional(readOnly = true)
public class RacevideoService extends CrudService<RacevideoDao, Racevideo> {

	public Racevideo get(String id) {
		return super.get(id);
	}
	
	public List<Racevideo> findList(Racevideo racevideo) {
		return super.findList(racevideo);
	}
	
	public Page<Racevideo> findPage(Page<Racevideo> page, Racevideo racevideo) {
		return super.findPage(page, racevideo);
	}
	
	@Transactional(readOnly = false)
	public void save(Racevideo racevideo) {
		super.save(racevideo);
	}
	
	@Transactional(readOnly = false)
	public void delete(Racevideo racevideo) {
		super.delete(racevideo);
	}
	
	@Transactional(readOnly = false)
	public void delete(String ids) {
		if(!StringUtils.isEmpty(ids)){
			String [] idArray = ids.split(",");
			for (String id : idArray) {
				Racevideo racevideo = super.get(id);
				super.delete(racevideo);
			}
		}
	} 
	
}